<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib prefix="sec" uri="http://www.springframework.org/security/tags" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div class="grid_16 header">
    <div class="title">
        <a href="/"><h1>MySky.by</h1></a>
    </div>
    <div class="content">
        <sec:authorize ifAnyGranted="ROLE_ANONYMOUS">
            <a href="/user/auth.html" title="Войти">Войти</a>

            <div class="separator">&nbsp;|&nbsp;</div>
            <a href="/user/registration.html" title="Регистрация">Регистрция</a>
        </sec:authorize>


        <sec:authorize ifNotGranted="ROLE_ANONYMOUS">
            <p>Вы вошли как:&nbsp;${user.login}</p>
            <span><a href="/cabinet.html" title="Личный кабинет">Личный кабинет</a></span>
            <sec:authorize access="hasRole('ROLE_ADMIN')">
                <span><a href="/admin.html" title="Администраторская">Администраторская</a></span>
            </sec:authorize>
            <form action="/action/logout.html" method="POST">
                <p>
                    <button type="submit" class="button red">Выйти</button>
                </p>
            </form>
        </sec:authorize>

    </div>
</div>
<div class="clear">

</div>